package cn.dubito.springcloud;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author liliang
 * @description:
 * @date 2018/5/21.
 */
@RestController
public class ConfigClientRest {

    @Value("${spring.application.name}")
    private String applicationName;

    @Value("${eureka.client.service-url.defaultZone}")
    private String eurekaServers;

    @Value("${server.port}")
    private String port;

    @GetMapping("/config")
    public String getConfig() {
        String str = "applicationName:" + applicationName + "\t eurekaServers:" + "\t port" + port;
        System.out.println("====== str:" + str);
        return str;
    }
}
